﻿using System;
using System.Collections.Generic;

namespace InfiniTec.Collection.Generic
{
    public static class CollectionExtension
    {
        public static void AddRange<T>(this ICollection<T> items, IEnumerable<T> itemsToAdd)
        {
            if (items == null) throw new ArgumentNullException("items");
            if (itemsToAdd == null) throw new ArgumentNullException("itemsToAdd");

            foreach (var item in itemsToAdd)
            {
                items.Add(item);
            }
        }
    }
}